perm filename PENS.TMP[MF,DEK]1 blob sn#754273 filedate 1984-05-16 generic text, type T, neo UTF8
% this file was used in the lecture about pens and transformations

% first come some things for setup that we've seen before
delimiters ();
autorounding:=2; smoothing:=1;
proofing:=1;
openwindow 5 from (0,0) to (400,400) at (-100,300);
def proofrule(expr a,b) =
	special "rule"; numspecial xpart a; numspecial ypart a;
	numspecial xpart b; numspecial ypart b enddef;
edges ee; ee:=nulledges;
def draw expr p = addto ee doublepath p withpen pencircle enddef;
def right=(1,0) enddef;

def next =
	display ee on 5;
	proofrule ((-10,0),(100,0));
	proofrule ((0,-10),(0,100));
	shipout ee;
	ee:=nulledges;
enddef;

% here's something new that will be explained later
def pensquare = makepen ((-.5,-.5)..(.5,-.5)..(.5,.5)..(-.5,.5)..cycle) enddef;

% the next stuff puts dots on the first character
def dot expr a = special " 1"; numspecial xpart a; numspecial ypart a enddef;
dot (8,10) scaled 20; dot (0,2) scaled 20;
dot (2.5,0) scaled 20; dot (8,0) scaled 20;

pausing:=1; % now the class gets to see the rest of the file

path a;
a = (8,10)..tension 1.2..(0,2)..(2.5,0){right}..(8,10){1,10}
   & (8,10){-1,-10}..bounded..(8,0){right};	% N.B.: Not a cycle!

draw a scaled 20; draw a shifted (200,50); next;



draw a scaled 20; draw a xmult 20 ymult 30 shifted (200,0); next;





















draw a scaled 20 slanted 1/6; next;

















draw a scaled 20 slanted 1; next;
draw a scaled 20 slanted 1/6 rotated 60; next;



















def drawit = draw a scaled 20 enddef;
drawit withpen pencircle scaled 10; next;



















drawit withpen pencircle scaled 50; next;
drawit withpen pencircle xmult 20 ymult 30; next;



















drawit withpen pencircle xmult 30 ymult 20 rotated 20; next;



















drawit withpen pencircle xmult 30 ymult 10 rotated 20; next;
drawit withpen pensquare xmult 30 rotated 20; next;



















drawit withpen pensquare xmult 10 rotated 20; next;



















drawit withpen pensquare xmult 30 rotated 60; next;
drawit withpen pensquare xmult 30 rotated -60; next;



















drawit withpen pensquare xmult 30 ymult 3 rotated -60; next;



















drawit withpen pensquare scaled 10; next;
drawit withpen pencircle scaled 20 slanted 2; next;



















drawit slanted 1/6 withpen pencircle xmult 10 ymult 7 rotated 30; next;



















drawit slanted -1/6 withpen pencircle ymult 30; next; end